1.1 Setting up Pentest lab

Ingredients:

  1. Virtualization Softwares - To run different OS on your OS.
  2. Kali Linux - Penetration Testing Distrubtion
  3. Metasploitable 2 - Vulnerable OS based on Ubuntu linux
  4. OWASP Webgoat - Vulnerable Web Application (includes lessons)

Recipe:
Virtual box networking

15abebf181999dd36e24a09b77df9cf7.png


Setup an Internal Network with Virtualbox

On Windows:

300778c5f0c0454abac6ac6becc429ef.png

Note: Above, Please replace 10.10.10 to 192.168.64

On Linux(Ubuntu):

vboxmanage dhcpserver add --netname mydhcpnetwork --ip 192.168.64.1 --netmask 255.255.255.0 --lowerip 192.168.64.2 --upperip 192.168.64.10 --enable

--netname mydhcpnetwork: The internal network will be named 'mydhcpnetwork'.

--ip 192.168.64.1: The IP address of your DHCP server inside the internal network.
--netmask 255.255.255.0: The subnet mask.
--lowerip 192.168.64.2: The lower bound of the IP addresses that can be assigned to network members.
--upperip 192.168.64.10: The upper bound of the same thing.
--enable: Enable the DHCP server.

79365a91f29546379bedefb4d01a64ff.png

vboxmanage list dhcpservers

d9c39c18a9d412cf4cdc2bf5c0318d18.png

Configuration of Ingredients:

  1. Kali linux
    Ram 2GB
    Storage 20GB
    Network Adapter 1 - internal network ,name - mydhcpnetwork (using DHCP server and network created earlier)
    Adapter 2 - NAT (if you want to use the internet on kali)
  1. you need more than 4GB of memory (RAM)
    OR
  2. you need to be able to make it so parts of memory cannot be used for executable code, e.g. if you have security concerns.

*Physical Address Extension (PAE), sometimes referred to as Page Address Extension

6a144e02f552799db64d05b6f6abc875.png

  1. Metasploitable 2
    Linux,Ubuntu 32bit
    RAM 512mb
    Storage 8GB
    Network same as above except do not enable NAT only configure network adapter 1.
    After installing and starting metasploit login and see the ip address and to learn more see Metasploit Setup Guide from Rapid7

  2. OWASP Webgoat
    (Learn more : https://owasp.org/www-project-webgoat/)
    We are doing this in Kali VM.

Install JAVA and Apache Tomcat (Make Sure Java is in your path This should already be the case after you install Java. If it is not, add it to your path)

132e89b9bab9217d17eb774bc93aa771.png

Browse and go to http://localhost:8080/WebGoat to get the login screen.

49ee6a4fd48d8661901db9bec68d383e.png


Finished Dish:

95894d8063f33f4d76f435b55b840094.png


31bfe33d1806530adcafef1496319a4c.png

3a7f6d0f6ff24ce3baca2440113c0044.png

e827b49e30597a7583aecc510ad019a6.png